package com.itliupeng.stock.mapper;

import com.itliupeng.stock.pojo.domain.InnerMarketDomain;
import com.itliupeng.stock.pojo.entity.StockMarketIndexInfo;
import org.apache.ibatis.annotations.Param;
import org.joda.time.DateTime;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author 22375
* @description 针对表【stock_market_index_info(国内大盘数据详情表)】的数据库操作Mapper
* @createDate 2025-04-06 20:25:45
* @Entity com.itliupeng.stock.pojo.entity.StockMarketIndexInfo
*/
public interface StockMarketIndexInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockMarketIndexInfo record);

    int insertSelective(StockMarketIndexInfo record);

    StockMarketIndexInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockMarketIndexInfo record);

    int updateByPrimaryKey(StockMarketIndexInfo record);

    /**
     * 根据指定时间点查询指定大盘编码对应的数据
     * @param curDate 指定的时间点
     * @param mCodes 大盘的编码集合
     * @return
     */
    List<InnerMarketDomain> GetMarketInfo(@Param("curDate") Date curDate, @Param("mCodes") List<String> mCodes);


    /**
     * 更具给定的时间段获取，每分钟对应的交易量的总和
     * @param tStartDate
     * @param tEdnDate
     * @param inner
     * @return
     */
    List<Map> getSumAmtInfo(@Param("openDate") Date tStartDate, @Param("endDate") Date tEdnDate, @Param("marketCodes") List<String> inner);

    int insertBatch(@Param("list") List<StockMarketIndexInfo> entities);

    List<Map> getSearch(@Param("searchStr") String searchStr);
}
